*{
	margin: 0;
	padding: 0;
}
html{
	background:linear-gradient(#ff0 0%,#000 80%);
    height: 100%;
}
/*最外层容器样式*/
.wrap{
	width: 200px;
	height: 200px;
	/*改变左右上下,图片方块移动*/
	margin: 150px 360px;
	position: relative;
	
}
/*包裹所有容器样式*/
.wrap .cube{
	width: 200px;
	height: 200px;
	margin: 0 auto;
	/*border: solid 1px #000000;*/
	transform-style: preserve-3d;
	/*起始位置*/
	transform: rotateX(-30deg) rotateY(-80deg);
	-webkit-animation: rotate 20s infinite;
	/*匀速*/
	animation-timing-function: linear;
}
@-webkit-keyframes rotate{
	from{transform: rotateX(0deg) rotateY(0deg);}
	to{transform: rotateX(360deg) rotateY(360deg);}
}

.cube img{
	position: absolute;
	width: 200px;
	height: 200px;
	opacity: 0.8;
	transition: all .4s;
	width: 200px;
	height: 200px;
}
.cube img:nth-child(1){
	transform: rotateY(0deg) translateZ(100px);
}
.cube img:nth-child(2){
	transform: translateZ(-100px) rotateY(180deg);
}
.cube img:nth-child(3){
	transform: rotateY(90deg) translateZ(100px);
}
.cube img:nth-child(4){
	transform: rotateY(-90deg) translateZ(100px);
}
.cube img:nth-child(5){
	transform: rotateX(90deg) translateZ(100px);
}
.cube img:nth-child(6){
	transform: rotateX(-90deg) translateZ(100px);
}
/*鼠标移入*/
.cube:hover img:nth-child(1){
	transform: rotateY(0deg) translateZ(200px);
}
.cube:hover img:nth-child(2){
	transform: translateZ(-200px) rotateY(180deg);
}
.cube:hover img:nth-child(3){
	transform: rotateY(90deg) translateZ(200px);
}
.cube:hover img:nth-child(4){
	transform: rotateY(-90deg) translateZ(200px);
}
.cube:hover img:nth-child(5){
	transform: rotateX(90deg) translateZ(200px);
}
.cube:hover img:nth-child(6){
	transform: rotateX(-90deg) translateZ(200px);
}


/*小方块*/
.cube .in_pic{
	width: 100px;
	height: 100px;
	top: 50px;
	left: 50px;
}
.cube img:nth-child(7){
	transform: rotateY(0deg) translateZ(50px);
}
.cube img:nth-child(8){
	transform: translateZ(-50px) rotateY(180deg);
}
.cube img:nth-child(9){
	transform: rotateY(90deg) translateZ(50px);
}
.cube img:nth-child(10){
	transform: rotateY(-90deg) translateZ(50px);
}
.cube img:nth-child(11){
	transform: rotateX(90deg) translateZ(50px);
}
.cube img:nth-child(12){
	transform: rotateX(-90deg) translateZ(50px);
}